package com.yehuo.app.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yehuo.app.entity.Group;
import org.apache.ibatis.annotations.Select;

public interface GroupMapper extends BaseMapper<Group> {

    @Select({"SELECT CASE WHEN count(1) > 0 THEN 1 ELSE 0 END FROM t_group_member gm WHERE gm._gid = #{target} AND gm._mid = #{userId}"})
    boolean selectExitsUser(String target, String userId);
}
